import { InjectionKey } from 'vue'
import { createStore, Store } from 'vuex'
const moduleA = {
  state: {
    name: '李白',
  },
  mutations: {
    setName(state: moduleAType) {
      state.name = '杜普'
    },
  },
  actions: {},
}
interface moduleAType {
  name: string
}

interface store<S> {
  modules: {
    a: {
      state: S
      mutations: (state: moduleAType) => void
    }
  }
}
export const store = createStore<store<moduleAType>>({
  modules: {
    a: moduleA,
  },
})
console.log(store)